<%--
  Created by IntelliJ IDEA.
  User: KK
  Date: 2022/10/9
  Time: 17:40
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@include file="page/head.jsp"%>
<html>
<head>
    <title>首页</title>
</head>
<body>
<div>
    <div>
        <div class="col-md-8 col-md-offset-2">
        <table class="table table-bordered">
                <thead>
                <tr>
                    <th>员工编号</th>
                    <th>员工姓名</th>
                    <th>员工性别</th>
                    <th>员工工资</th>
                    <th>员工密码</th>
                    <th>员工部门</th>
                    <th>员工生日</th>
                    <th>操作</th>
                </tr>
                </thead>
                <c:forEach var="emps" items="${emps}">
                <tbody>
                <tr>
                    <td>${emps.eno}</td>
                    <td>${emps.ename}</td>
                    <td>${emps.esex}</td>
                    <td>${emps.salary}</td>
                    <td>${emps.pwd}</td>
                    <td>${emps.dno}</td>
                    <td>
                        <fm:formatDate value="${emps.bornDate}" pattern="yyyy-MM-dd"/>
                    </td>
                    <td>
                        <button type="button" class="btn btn-danger" onclick="del(${e.eno})">删除</button>
                        <button type="button" class="btn btn-warning" onclick="updateEmp(${emps.eno})">修改</button>
                    </td>
                </tr>
                </tbody>
                </c:forEach>
        </div>
    </div>
</div>
</table>
<script>
    function del(eno) {
        location.assign("/emp/delEmp?eno="+eno);
    }
</script>
</body>
</html>
